Skip to content

Add adapter controller#8

Open
LuisFSegalla wants to merge 12 commits intomainfrom
add-adapter-controller
Open

Add adapter controller#8
LuisFSegalla wants to merge 12 commits intomainfrom
add-adapter-controller

Conversation

@LuisFSegalla
Copy link
Contributor

Add a custom FP adapter controller for Xspress.

TODO:

  • add tests

@LuisFSegalla LuisFSegalla force-pushed the add-adapter-controller branch from d031d89 to 424f0b4 Compare March 9, 2026 09:09
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 86.84211% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.65%. Comparing base (e4830a5) to head (4f7c2d1).

Files with missing lines Patch % Lines
src/fastcs_xspress/xspress_controller.py 80.00% 3 Missing ⚠️
...rc/fastcs_xspress/xspress_fp_adapter_controller.py 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
- Coverage   94.20%   90.65%   -3.55%     
==========================================
  Files           4        5       +1     
  Lines          69      107      +38     
==========================================
+ Hits           65       97      +32     
- Misses          4       10       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


async def initialise(self):
await super().initialise()
# self.chunks.enable_tracing()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed

[value, 1, 4096], # pyright: ignore[reportArgumentType]
)

self.chunks.add_on_update_callback(callback=set_chunk_fp)
Copy link
Contributor

@GDYendell GDYendell Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add a test for this you could:

  • create a controller XspressFPAdapterController

  • mock super initialise

    mocker.patch.object(
        FrameProcessorAdapterController,
        "initialise",
        new_callable=mocker.AsyncMock,
    )
  • mock get_all_sub_controllers to return a list of, say, 4 odin parameters {idx}/chunks
  • mock controller.connection
  • manually create controller.chunks (because we aren't calling initialise)
  • call controller.initialise to create and add the callback
  • do chunks.set
  • Check that the connection mock has 4 calls to the correct uri with the correct value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Xspress FrameProcessor adapter controller with scalar chunk / batch size

2 participants